package com.ruoyi.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.system.mapper.SysSettingMapper;
import com.ruoyi.system.domain.SysSetting;
import com.ruoyi.system.service.ISysSettingService;

/**
 * 参数配置Service业务层处理
 *
 * @author siashan
 * @date 2024-02-22
 */
@Service
public class SysSettingServiceImpl extends ServiceImpl<SysSettingMapper, SysSetting> implements ISysSettingService {

    @Override
    public SysSetting getByConfigKey(String configKey) {
        LambdaQueryWrapper<SysSetting>  wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(SysSetting::getConfigKey,configKey);
        return getOne(wrapper);
    }
}
